<template>
  <div class="technician-view">
    <t-nav-bar
        title="维修人员端"
        left-text="返回"
        left-arrow
        @click-left="handleBack"
    />
    <div class="content">
      <t-cell-group>
        <t-cell title="首页" @click="navigateTo('home')" />
        <t-cell title="个人中心" @click="navigateTo('personal-center')" />
        <t-cell title="维修安排" @click="navigateTo('task-schedule')" />
        <t-cell title="维修记录" @click="navigateTo('repair-records')" />
        <t-cell title="上传维修记录" @click="navigateTo('upload')" />
        <t-cell title="物料仓库" @click="navigateTo('warehouse')" />
      </t-cell-group>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router = useRouter()

const handleBack = () => {
  router.back()
}

const navigateTo = (page: string) => {
  router.push(`/technician/${page}`)
}
</script>

<style scoped>
.technician-view {
  height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  background-color: white;
}

.content {
  flex: 1;
  padding: 20px;
}
</style>
